<?php
/**
 * adds the required elements to the page footer
 *
 * @package    	Digitalus\Ui
 * @copyright  	Copyright (c) 2009,  Digitalus Media USA (http://digitalusmedia.net)
 * @license    	New BSD License, library/Dig/License.txt
 * @version 	2.0
 */
class DigUi_View_Helper_DigUiFooter extends Zend_View_Helper_Abstract 
{
    public function digUiFooter()
    {

        // load the javascript
        $skinConfig = DigUi_Service_Template::currentSkin();
        if($skinConfig->javascript) {
            foreach ($skinConfig->javascript as $jsFile) {
                DigUi_Service_Template::addJavascript($jsFile);
            }
        }
        $settings = Dig_Service_Module::settings('digUi');
        $footer = array();
        if(array_key_exists('ZendX_JQuery_View_Helper_', $this->view->getHelperPaths())) {
            $footer[] = $this->view->jQuery();
        }
        return implode(PHP_EOL, $footer);
    }
}
?>